#pragma once

// from https://github.com/baidu-research/DeepBench/blob/master/code/kernels/conv_problems.h

#define CONV_ARG_NAMES()                                                                                               \
  ArgNames({"W", "H", "C", "N", "K", "filter_w(s)", "filter_h(r)", "pad_w", "pad_h", "wstride", "hstride"})

#define SMALL_CONV_PROBLEMS()                                                                                          \
  Args({112, 112, 64, 1, 64, 1, 1, 0, 0, 1, 1})                                                                        \
      ->Args({56, 56, 64, 1, 256, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 1, 64, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 1, 128, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({28, 28, 128, 1, 512, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 1, 128, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 1, 256, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({14, 14, 256, 1, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({28, 28, 512, 1, 1024, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({14, 14, 1024, 1, 256, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 256, 1, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 1024, 1, 512, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({7, 7, 512, 1, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({7, 7, 512, 1, 2048, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({14, 14, 1024, 1, 2048, 1, 1, 0, 0, 2, 2})                                                                \
      ->Args({7, 7, 2048, 1, 512, 1, 1, 0, 0, 1, 1})                                                                   \
      ->CONV_ARG_NAMES()

#define ALL_CONV_PROBLEMS()                                                                                            \
  Args({700, 161, 1, 1, 32, 20, 5, 0, 0, 2, 2})                                                                        \
      ->Args({700, 161, 1, 2, 32, 20, 5, 0, 0, 2, 2})                                                                  \
      ->Args({700, 161, 1, 4, 32, 20, 5, 0, 0, 2, 2})                                                                  \
      ->Args({341, 79, 32, 1, 32, 10, 5, 0, 0, 2, 2})                                                                  \
      ->Args({341, 79, 32, 2, 32, 10, 5, 0, 0, 2, 2})                                                                  \
      ->Args({341, 79, 32, 4, 32, 10, 5, 0, 0, 2, 2})                                                                  \
      ->Args({480, 48, 1, 1, 16, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({240, 24, 16, 1, 32, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({120, 12, 32, 1, 64, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({60, 6, 64, 1, 128, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({108, 108, 3, 1, 64, 3, 3, 1, 1, 2, 2})                                                                   \
      ->Args({54, 54, 64, 1, 64, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({27, 27, 128, 1, 128, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({14, 14, 128, 1, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({7, 7, 256, 1, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({224, 224, 3, 1, 64, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({112, 112, 64, 1, 128, 3, 3, 1, 1, 1, 1})                                                                 \
      ->Args({56, 56, 128, 1, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({28, 28, 256, 1, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({14, 14, 512, 1, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({7, 7, 512, 1, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({224, 224, 3, 2, 64, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({112, 112, 64, 2, 128, 3, 3, 1, 1, 1, 1})                                                                 \
      ->Args({56, 56, 128, 2, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({28, 28, 256, 2, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({14, 14, 512, 2, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({7, 7, 512, 2, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({224, 224, 3, 1, 64, 7, 7, 3, 3, 2, 2})                                                                   \
      ->Args({28, 28, 192, 1, 32, 5, 5, 2, 2, 1, 1})                                                                   \
      ->Args({28, 28, 192, 1, 64, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({14, 14, 512, 1, 48, 5, 5, 2, 2, 1, 1})                                                                   \
      ->Args({14, 14, 512, 1, 192, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({7, 7, 832, 1, 256, 1, 1, 0, 0, 1, 1})                                                                    \
      ->Args({7, 7, 832, 1, 128, 5, 5, 2, 2, 1, 1})                                                                    \
      ->Args({224, 224, 3, 2, 64, 7, 7, 3, 3, 2, 2})                                                                   \
      ->Args({28, 28, 192, 2, 32, 5, 5, 2, 2, 1, 1})                                                                   \
      ->Args({28, 28, 192, 2, 64, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({14, 14, 512, 2, 48, 5, 5, 2, 2, 1, 1})                                                                   \
      ->Args({14, 14, 512, 2, 192, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({7, 7, 832, 2, 256, 1, 1, 0, 0, 1, 1})                                                                    \
      ->Args({7, 7, 832, 2, 128, 5, 5, 2, 2, 1, 1})                                                                    \
      ->Args({56, 56, 64, 1, 64, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({56, 56, 64, 1, 256, 1, 1, 0, 0, 2, 2})                                                                   \
      ->Args({28, 28, 128, 1, 128, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({28, 28, 128, 1, 512, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({14, 14, 256, 1, 256, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({14, 14, 256, 1, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({14, 14, 256, 1, 1024, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({7, 7, 512, 1, 512, 1, 1, 0, 0, 1, 1})                                                                    \
      ->Args({7, 7, 2048, 1, 512, 1, 1, 3, 3, 2, 2})                                                                   \
      ->Args({56, 56, 64, 2, 64, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({56, 56, 64, 2, 256, 1, 1, 0, 0, 2, 2})                                                                   \
      ->Args({28, 28, 128, 2, 128, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({28, 28, 128, 2, 512, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({14, 14, 256, 2, 256, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({14, 14, 256, 2, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({14, 14, 256, 2, 1024, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({7, 7, 512, 2, 512, 1, 1, 0, 0, 1, 1})                                                                    \
      ->Args({7, 7, 2048, 2, 512, 1, 1, 3, 3, 2, 2})                                                                   \
      ->Args({700, 161, 1, 1, 64, 5, 5, 1, 1, 2, 2})                                                                   \
      ->Args({350, 80, 64, 1, 64, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({350, 80, 64, 1, 128, 5, 5, 1, 1, 2, 2})                                                                  \
      ->Args({175, 40, 128, 1, 128, 3, 3, 1, 1, 1, 1})                                                                 \
      ->Args({175, 40, 128, 1, 256, 5, 5, 1, 1, 2, 2})                                                                 \
      ->Args({84, 20, 256, 1, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({84, 20, 256, 1, 512, 5, 5, 1, 1, 2, 2})                                                                  \
      ->Args({42, 10, 512, 1, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({700, 161, 1, 2, 64, 5, 5, 1, 1, 2, 2})                                                                   \
      ->Args({350, 80, 64, 2, 64, 3, 3, 1, 1, 1, 1})                                                                   \
      ->Args({350, 80, 64, 2, 128, 5, 5, 1, 1, 2, 2})                                                                  \
      ->Args({175, 40, 128, 2, 128, 3, 3, 1, 1, 1, 1})                                                                 \
      ->Args({175, 40, 128, 2, 256, 5, 5, 1, 1, 2, 2})                                                                 \
      ->Args({84, 20, 256, 2, 256, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({84, 20, 256, 2, 512, 5, 5, 1, 1, 2, 2})                                                                  \
      ->Args({42, 10, 512, 2, 512, 3, 3, 1, 1, 1, 1})                                                                  \
      ->Args({112, 112, 64, 1, 64, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({56, 56, 64, 1, 256, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 1, 64, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 1, 128, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({28, 28, 128, 1, 512, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 1, 128, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 1, 256, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({14, 14, 256, 1, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({28, 28, 512, 1, 1024, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({14, 14, 1024, 1, 256, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 256, 1, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 1024, 1, 512, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({7, 7, 512, 1, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({7, 7, 512, 1, 2048, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({14, 14, 1024, 1, 2048, 1, 1, 0, 0, 2, 2})                                                                \
      ->Args({7, 7, 2048, 1, 512, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({112, 112, 64, 2, 64, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({56, 56, 64, 2, 256, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 2, 64, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({56, 56, 256, 2, 128, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({28, 28, 128, 2, 512, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 2, 128, 1, 1, 0, 0, 1, 1})                                                                  \
      ->Args({28, 28, 512, 2, 256, 1, 1, 0, 0, 2, 2})                                                                  \
      ->Args({14, 14, 256, 2, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({28, 28, 512, 2, 1024, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({14, 14, 1024, 2, 256, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 256, 2, 1024, 1, 1, 0, 0, 1, 1})                                                                 \
      ->Args({14, 14, 1024, 2, 512, 1, 1, 0, 0, 2, 2})                                                                 \
      ->Args({7, 7, 512, 2, 512, 3, 3, 1, 1, 1, 1})                                                                    \
      ->Args({7, 7, 512, 2, 2048, 1, 1, 0, 0, 1, 1})                                                                   \
      ->Args({14, 14, 1024, 2, 2048, 1, 1, 0, 0, 2, 2})                                                                \
      ->Args({7, 7, 2048, 2, 512, 1, 1, 0, 0, 1, 1})                                                                   \
      ->CONV_ARG_NAMES()
